package com.gugee.notice.core.repository;

import com.gugee.notice.core.model.SysUser;
import org.springframework.data.jdbc.repository.query.Query;
import org.springframework.data.repository.CrudRepository;

import java.util.List;

public interface SysUserRepository extends CrudRepository<SysUser,Integer> {


    @Query("select u.* from user_module m left join sys_user u on m.user_id = u.id where m.module_id = :moduleId")
    List<SysUser> findByModuleId(int moduleId);
}
